package generic;
/**
 * @Author:Cjj
 * @Date:2025/6/16
 */
public abstract class Person implements Comparable<Person>{
    int age;

    public Person(int age){
        this.age=age;
    }
    @Override
    public int compareTo(Person o){
        if(o==null){
            return -1;
        }
          return age -o.age;
    }
}
